

capture program drop estaddfirst
program define estaddfirst
syntax , n(string)

tokenize `n'

local stop: word count `n'

di "`stop'"
di "`n'"

mat first = e(first)

local i 1
foreach var in `e(instd)' {
 
    if `i'<=`stop' {
	  
      estadd scalar F`i' 	= el(e(first),4,`i')
      estadd scalar Fp`i' = el(e(first),7,`i')
	  estadd scalar SWF`i' 	= el(e(first),8,`i')
	  estadd scalar SWp`i'	= el(e(first),11,`i')
	  estadd scalar SWR2`i'	= el(e(first),14,`i')
      estadd scalar APx`i'	= el(e(first),15,`i')
      estadd scalar APp`i'	= el(e(first),18,`i')
	  estadd scalar APr2`i'	= el(e(first),21,`i')
      }
    
      macro shift
      local ++i
      }
estadd scalar OverID = e(jp)
end

